<template >
  <div>
    <el-table :data="userrolelist" style="width: 100%">
      <el-table-column prop="userName" label="用户姓名"> </el-table-column>
      <el-table-column prop="userPhone" label="用户手机号"> </el-table-column>
      <el-table-column prop="userType" label="客户类型">
        <template slot-scope="scope">
          <span v-if="scope.row.userSex == 1">客户</span>
          <span v-if="scope.row.userSex == 2">VIP</span>
          <span v-if="scope.row.userSex == 3">管理员</span>
        </template>
      </el-table-column>
      <el-table-column prop="userGrowthValue" label="成长值"> </el-table-column>
      <el-table-column prop="userNetbalance" label="可用实冲余额">
      </el-table-column>
      <el-table-column prop="userGiftbalance" label="可用赠送余额">
      </el-table-column>
      <el-table-column prop="userAvailableintegral" label="可用积分">
      </el-table-column>
      <el-table-column prop="userSex" label="性别">
        <template slot-scope="scope">
          <span v-if="scope.row.userSex == 2">男</span>
          <span v-if="scope.row.userSex == 1">女</span>
        </template>
      </el-table-column>
      <el-table-column prop="userBirthday" label="生日"> </el-table-column>
      <el-table-column prop="userAdressPC" label="地址"> </el-table-column>
      <el-table-column prop="userDetailAddress" label="详细地址">
      </el-table-column>
      <el-table-column prop="roleName" label="角色名称"> </el-table-column>
      <el-table-column prop="roleContent" label="角色简介"> </el-table-column>
    </el-table>
  </div>
</template>
<script>
import { getUserRoles } from "@/api/userrole";
export default {
  data() {
    return {
      userrolelist: [],
      from: {
        pageIndex: 1,
        pageSize: 3,
        userid: 0,
      },
    };
  },
  methods: {
    getuserrole() {
      getUserRoles(this.from).then((res) => {
        this.userrolelist = res.data;
      });
    },
  },
  created() {
    this.getuserrole();
  },
};
</script>
<style >
</style>